package com.example.word.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户表
 * @TableName tb_user_auth
 */
@TableName(value ="tb_user_auth")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserAuth implements Serializable {
    /**
     * 用户表的id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名
     */
    @TableField(value = "username")
    private String username;

    /**
     * 用户id
     */
    @TableField(value = "user_info_id")
    private Integer userInfoId;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 类型: 教师/学生
     */
    @TableField(value = "login_type")
    private Integer loginType;

    /**
     * 用户登录ip
     */
    private String ipAddress;

    /**
     * ip来源
     */
    private String ipSource;


    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
    /**
     * 最后一次登录时间
     */
    private LocalDateTime lastLoginTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}